package com.ruoyi.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.domain.WdyDirectReward;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;
import java.util.List;

/**
 * 直推奖 服务层
 * 
 * @author ruoyi
 * @date 2019-12-26
 */
public interface IWdyDirectRewardService extends IService<WdyDirectReward>
{
	/**
     * 查询直推奖信息
     * 
     * @param id 直推奖ID
     * @return 直推奖信息
     */
	public WdyDirectReward selectWdyDirectRewardById(Long id);
	
	/**
     * 查询直推奖列表
     * 
     * @param wdyDirectReward 直推奖信息
     * @return 直推奖集合
     */
	public List<WdyDirectReward> selectWdyDirectRewardList(WdyDirectReward wdyDirectReward);
	
	/**
     * 新增直推奖
     * 
     * @param wdyDirectReward 直推奖信息
     * @return 结果
     */
	public int insertWdyDirectReward(WdyDirectReward wdyDirectReward);
	
	/**
     * 修改直推奖
     * 
     * @param wdyDirectReward 直推奖信息
     * @return 结果
     */
	public int updateWdyDirectReward(WdyDirectReward wdyDirectReward);
		
	/**
     * 删除直推奖信息
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	public int deleteWdyDirectRewardByIds(String ids);

    @Transactional(rollbackFor = Exception.class)
	public void reward(String userId, BigDecimal txnAmount, Long txnId, int type);
}
